  <?php
  //Loading the Zend Loader class to load the other classes
  require_once 'config.php';
  require_once 'libraries/Zend/Loader.php';
  Zend_Loader::loadClass('Zend_Gdata_Photos');
  Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
  Zend_Loader::loadClass('Zend_Gdata_AuthSub');
  
  //Specifying Service Name
  $serviceName = Zend_GData_Photos::AUTH_SERVICE_NAME;
  
  $client = Zend_GData_ClientLogin::getHttpClient(
    $USER, $PWD, $serviceName);
  $gp = new Zend_GData_Photos();
  foreach ($gp->getUserFeed($USER) as $album){
    $albumCover = $album->mediaGroup->thumbnail[0]->url;
    echo sprintf('<img src="%s">', $albumCover);    
  }
  
  /*
  //This section can be in case we need to perform admin
  //work
  $gp = new Zend_Gdata_Photos(
  $client, "Google-DevelopersGuide-1.0");
  
  try {
    $userFeed = $gp->getUserfeed('default');
    foreach ($userFeed as $userEntry){
      echo $userEntry->title->text . '<br>';
    }
  } catch (Zend_Gdata_App_HttpException $e){
    echo 'Error ' . getMessage() . '<br';
  } catch (Zend_Gdata_App_Exception $e){
    echo $e->getMessage();
  }
  */
  ?>